<?
$host    = "tcp://127.0.0.1";
$port    = 1007;
$message = "RTG";
echo "\nMessage To server :".$message;
while(1){
	usleep(1000000); //// unit microsec
	echo 'Success';
	$fp = fsockopen($host, $port, $errno, $errstr);
	if (!$fp) {
		echo "$errstr ($errno)<br />\n";
	} else {
		fwrite($fp,$message); 
		$TEXT= fread($fp,8000);
		fwrite($fp, $TEXT);
		echo "Reply From Server  :" .$TEXT;
		fclose($fp);
	}
}
// close socket

?>
